package br.com.consignum;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author Consignum
 *
 */

public class ProxyConsignum<T> implements InvocationHandler {  
	  
    public Class<T> classe;
    
  //  final T vo;
  
//    public ProxyConsignum(final T classe) {  
//        this.classe = classe;  
//    }  
  
    public Object invoke( final Object proxy, final Method method, final Object[] args) throws Throwable {  
        try {  
        	System.out.println("Passou por aqui...");
            return method.invoke(classe.newInstance(), args);  
        } catch ( Exception e ) {  
            return new Integer(0);  
        }  
    }  
} 

